↳ Prolog
↳ PrologToPiTRSProof
sameleaves_in(tree(T1, T2), tree(S1, S2)) → U1(T1, T2, S1, S2, getleave_in(T1, T2, L, T))
getleave_in(tree(A, B), C, L, O) → U4(A, B, C, L, O, getleave_in(A, tree(B, C), L, O))
getleave_in(leaf(A), C, A, C) → getleave_out(leaf(A), C, A, C)
U4(A, B, C, L, O, getleave_out(A, tree(B, C), L, O)) → getleave_out(tree(A, B), C, L, O)
U1(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → U2(T1, T2, S1, S2, T, getleave_in(S1, S2, L, S))
U2(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → U3(T1, T2, S1, S2, sameleaves_in(T, S))
sameleaves_in(leaf(L), leaf(L)) → sameleaves_out(leaf(L), leaf(L))
U3(T1, T2, S1, S2, sameleaves_out(T, S)) → sameleaves_out(tree(T1, T2), tree(S1, S2))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
sameleaves_in(tree(T1, T2), tree(S1, S2)) → U1(T1, T2, S1, S2, getleave_in(T1, T2, L, T))
getleave_in(tree(A, B), C, L, O) → U4(A, B, C, L, O, getleave_in(A, tree(B, C), L, O))
getleave_in(leaf(A), C, A, C) → getleave_out(leaf(A), C, A, C)
U4(A, B, C, L, O, getleave_out(A, tree(B, C), L, O)) → getleave_out(tree(A, B), C, L, O)
U1(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → U2(T1, T2, S1, S2, T, getleave_in(S1, S2, L, S))
U2(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → U3(T1, T2, S1, S2, sameleaves_in(T, S))
sameleaves_in(leaf(L), leaf(L)) → sameleaves_out(leaf(L), leaf(L))
U3(T1, T2, S1, S2, sameleaves_out(T, S)) → sameleaves_out(tree(T1, T2), tree(S1, S2))
SAMELEAVES_IN(tree(T1, T2), tree(S1, S2)) → U11(T1, T2, S1, S2, getleave_in(T1, T2, L, T))
SAMELEAVES_IN(tree(T1, T2), tree(S1, S2)) → GETLEAVE_IN(T1, T2, L, T)
GETLEAVE_IN(tree(A, B), C, L, O) → U41(A, B, C, L, O, getleave_in(A, tree(B, C), L, O))
GETLEAVE_IN(tree(A, B), C, L, O) → GETLEAVE_IN(A, tree(B, C), L, O)
U11(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → U21(T1, T2, S1, S2, T, getleave_in(S1, S2, L, S))
U11(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → GETLEAVE_IN(S1, S2, L, S)
U21(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → U31(T1, T2, S1, S2, sameleaves_in(T, S))
U21(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → SAMELEAVES_IN(T, S)
sameleaves_in(tree(T1, T2), tree(S1, S2)) → U1(T1, T2, S1, S2, getleave_in(T1, T2, L, T))
getleave_in(tree(A, B), C, L, O) → U4(A, B, C, L, O, getleave_in(A, tree(B, C), L, O))
getleave_in(leaf(A), C, A, C) → getleave_out(leaf(A), C, A, C)
U4(A, B, C, L, O, getleave_out(A, tree(B, C), L, O)) → getleave_out(tree(A, B), C, L, O)
U1(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → U2(T1, T2, S1, S2, T, getleave_in(S1, S2, L, S))
U2(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → U3(T1, T2, S1, S2, sameleaves_in(T, S))
sameleaves_in(leaf(L), leaf(L)) → sameleaves_out(leaf(L), leaf(L))
U3(T1, T2, S1, S2, sameleaves_out(T, S)) → sameleaves_out(tree(T1, T2), tree(S1, S2))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
SAMELEAVES_IN(tree(T1, T2), tree(S1, S2)) → U11(T1, T2, S1, S2, getleave_in(T1, T2, L, T))
SAMELEAVES_IN(tree(T1, T2), tree(S1, S2)) → GETLEAVE_IN(T1, T2, L, T)
GETLEAVE_IN(tree(A, B), C, L, O) → U41(A, B, C, L, O, getleave_in(A, tree(B, C), L, O))
GETLEAVE_IN(tree(A, B), C, L, O) → GETLEAVE_IN(A, tree(B, C), L, O)
U11(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → U21(T1, T2, S1, S2, T, getleave_in(S1, S2, L, S))
U11(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → GETLEAVE_IN(S1, S2, L, S)
U21(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → U31(T1, T2, S1, S2, sameleaves_in(T, S))
U21(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → SAMELEAVES_IN(T, S)
sameleaves_in(tree(T1, T2), tree(S1, S2)) → U1(T1, T2, S1, S2, getleave_in(T1, T2, L, T))
getleave_in(tree(A, B), C, L, O) → U4(A, B, C, L, O, getleave_in(A, tree(B, C), L, O))
getleave_in(leaf(A), C, A, C) → getleave_out(leaf(A), C, A, C)
U4(A, B, C, L, O, getleave_out(A, tree(B, C), L, O)) → getleave_out(tree(A, B), C, L, O)
U1(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → U2(T1, T2, S1, S2, T, getleave_in(S1, S2, L, S))
U2(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → U3(T1, T2, S1, S2, sameleaves_in(T, S))
sameleaves_in(leaf(L), leaf(L)) → sameleaves_out(leaf(L), leaf(L))
U3(T1, T2, S1, S2, sameleaves_out(T, S)) → sameleaves_out(tree(T1, T2), tree(S1, S2))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
GETLEAVE_IN(tree(A, B), C, L, O) → GETLEAVE_IN(A, tree(B, C), L, O)
sameleaves_in(tree(T1, T2), tree(S1, S2)) → U1(T1, T2, S1, S2, getleave_in(T1, T2, L, T))
getleave_in(tree(A, B), C, L, O) → U4(A, B, C, L, O, getleave_in(A, tree(B, C), L, O))
getleave_in(leaf(A), C, A, C) → getleave_out(leaf(A), C, A, C)
U4(A, B, C, L, O, getleave_out(A, tree(B, C), L, O)) → getleave_out(tree(A, B), C, L, O)
U1(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → U2(T1, T2, S1, S2, T, getleave_in(S1, S2, L, S))
U2(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → U3(T1, T2, S1, S2, sameleaves_in(T, S))
sameleaves_in(leaf(L), leaf(L)) → sameleaves_out(leaf(L), leaf(L))
U3(T1, T2, S1, S2, sameleaves_out(T, S)) → sameleaves_out(tree(T1, T2), tree(S1, S2))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
GETLEAVE_IN(tree(A, B), C, L, O) → GETLEAVE_IN(A, tree(B, C), L, O)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
GETLEAVE_IN(tree(A, B), C) → GETLEAVE_IN(A, tree(B, C))
From the DPs we obtained the following set of size-change graphs:
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
U11(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → U21(T1, T2, S1, S2, T, getleave_in(S1, S2, L, S))
U21(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → SAMELEAVES_IN(T, S)
SAMELEAVES_IN(tree(T1, T2), tree(S1, S2)) → U11(T1, T2, S1, S2, getleave_in(T1, T2, L, T))
sameleaves_in(tree(T1, T2), tree(S1, S2)) → U1(T1, T2, S1, S2, getleave_in(T1, T2, L, T))
getleave_in(tree(A, B), C, L, O) → U4(A, B, C, L, O, getleave_in(A, tree(B, C), L, O))
getleave_in(leaf(A), C, A, C) → getleave_out(leaf(A), C, A, C)
U4(A, B, C, L, O, getleave_out(A, tree(B, C), L, O)) → getleave_out(tree(A, B), C, L, O)
U1(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → U2(T1, T2, S1, S2, T, getleave_in(S1, S2, L, S))
U2(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → U3(T1, T2, S1, S2, sameleaves_in(T, S))
sameleaves_in(leaf(L), leaf(L)) → sameleaves_out(leaf(L), leaf(L))
U3(T1, T2, S1, S2, sameleaves_out(T, S)) → sameleaves_out(tree(T1, T2), tree(S1, S2))
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
U11(T1, T2, S1, S2, getleave_out(T1, T2, L, T)) → U21(T1, T2, S1, S2, T, getleave_in(S1, S2, L, S))
U21(T1, T2, S1, S2, T, getleave_out(S1, S2, L, S)) → SAMELEAVES_IN(T, S)
SAMELEAVES_IN(tree(T1, T2), tree(S1, S2)) → U11(T1, T2, S1, S2, getleave_in(T1, T2, L, T))
getleave_in(tree(A, B), C, L, O) → U4(A, B, C, L, O, getleave_in(A, tree(B, C), L, O))
getleave_in(leaf(A), C, A, C) → getleave_out(leaf(A), C, A, C)
U4(A, B, C, L, O, getleave_out(A, tree(B, C), L, O)) → getleave_out(tree(A, B), C, L, O)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ UsableRulesReductionPairsProof
SAMELEAVES_IN(tree(T1, T2), tree(S1, S2)) → U11(S1, S2, getleave_in(T1, T2))
U21(T, getleave_out(L, S)) → SAMELEAVES_IN(T, S)
U11(S1, S2, getleave_out(L, T)) → U21(T, getleave_in(S1, S2))
getleave_in(tree(A, B), C) → U4(getleave_in(A, tree(B, C)))
getleave_in(leaf(A), C) → getleave_out(A, C)
U4(getleave_out(L, O)) → getleave_out(L, O)
getleave_in(x0, x1)
U4(x0)
The following rules are removed from R:
SAMELEAVES_IN(tree(T1, T2), tree(S1, S2)) → U11(S1, S2, getleave_in(T1, T2))
U21(T, getleave_out(L, S)) → SAMELEAVES_IN(T, S)
U11(S1, S2, getleave_out(L, T)) → U21(T, getleave_in(S1, S2))
Used ordering: POLO with Polynomial interpretation [25]:
getleave_in(leaf(A), C) → getleave_out(A, C)
POL(SAMELEAVES_IN(x1, x2)) = 2·x1 + 2·x2
POL(U11(x1, x2, x3)) = 1 + 2·x1 + 2·x2 + 2·x3
POL(U21(x1, x2)) = 2·x1 + 2·x2
POL(U4(x1)) = x1
POL(getleave_in(x1, x2)) = 1 + x1 + x2
POL(getleave_out(x1, x2)) = 1 + 2·x1 + x2
POL(leaf(x1)) = 2·x1
POL(tree(x1, x2)) = 2 + x1 + x2
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ UsableRulesReductionPairsProof
↳ QDP
↳ PisEmptyProof
getleave_in(tree(A, B), C) → U4(getleave_in(A, tree(B, C)))
U4(getleave_out(L, O)) → getleave_out(L, O)
getleave_in(x0, x1)
U4(x0)